@extends('backstage.layout.master')
@section('title', '字体列表')
@section('content')
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try {
                ace.settings.check('breadcrumbs', 'fixed')
            } catch (e) {
            }
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="backstage/home">主页</a>
            </li>
            <li>
                字体列表
            </li>
        </ul><!-- .breadcrumb -->
    </div>

    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <div class="page-content">
                    <div class="page-header">
                        <h1 style="display: inline-block;">
                            字体列表
                        </h1>
                        <a href="backstage/fonts/add"><button class="btn btn-danger add-btn-danger" style="float: right;">添加</button></a>
                    </div><!-- /.page-header -->

                    <div class="row">
                        <div class="col-xs-12">
                            <!-- PAGE CONTENT BEGINS -->
                                <div class="table-responsive">
                                    <table id="sample-table-2" class="table table-striped table-bordered table-hover">
                                        <thead>
                                        <tr>
                                            <th>字体ID</th>
                                            <th>字体名称</th>
                                            <th>字体预览图</th>
                                            <th>字体价格</th>
                                            <th>字体类型</th>
                                            <th>是否是默认字体</th>
                                            <th>
                                                <i class="icon-time bigger-110 hidden-480"></i>
                                                创建时间
                                            </th>
                                            <th>操作</th>
                                        </tr>
                                        </thead>

                                        <tbody>
                                        @foreach ($fonts as $font)
                                            <tr>
                                                <td>{{$font->font_id}}</td>
                                                <td>
                                                    {{$font->font_name}}
                                                </td>
                                                <td>
                                                    <img style="width:300px;" src="{{$font->font_image}}">
                                                </td>
                                                <td>{{$font->price}}</td>
                                                <td>
                                                    @if($font->font_type == 0)
                                                        英文
                                                    @elseif($font->font_type == 1)
                                                        中文
                                                    @else
                                                        中英文
                                                    @endif
                                                </td>
                                                <td>
                                                    @if($font->is_default == 1)
                                                        是
                                                        @else
                                                        否
                                                    @endif
                                                </td>
                                                <td class="hidden-480">{{date('Y-m-d H:i:s',$font->created_at)}}</td>
                                                <td>
                                                    <a href="backstage/fonts/update/{{$font->font_id}}">编辑</a>
                                                    @if($font->is_default == 0)
                                                        <a class="red" href="backstage/fonts/delete/{{$font->font_id}}" onclick="return confirm('确认删除吗？');">删除</a>
                                                    @endif
                                                </td>
                                            </tr>
                                        @endforeach
                                        </tbody>
                                    </table>
                                </div>
                            <div class="row">
                                <div>
                                    <div class="dataTables_paginate paging_bootstrap">
                                        <?php echo $fonts->render(); ?>
                                    </div>
                                </div>
                            </div>
                            <!-- PAGE CONTENT ENDS -->
                        </div><!-- /.col -->
                    </div><!-- /.row -->
                </div><!-- /.page-content -->
            </div>
        </div>
    </div>
@stop
@section('script')
@stop